package k2_oop.p2_inheritAndPolymorphic.demo08;

public class TestDemo8 {
    public static void main(String[] args) {
        Animal animal = new Dog();

        if(animal instanceof Dog){
            Dog dog = (Dog)animal;
        }else if(animal instanceof Cat){
            Cat cat = (Cat) animal;
        }else if(animal instanceof Bird){
            Bird bird = (Bird) animal;
        }

    }
}
